#ifndef _ASTEROIDCONTROLLER_H_
#define _ASTEROIDCONTROLLER_H_

#include "asteroid.h"
#include "octree.h"

#include <vector>

class AsteroidController
            : public GameObject {
public:
    AsteroidController(Game* game);
    virtual ~AsteroidController(void);
    bool GetEnableOctree() const;
    void SetEnableOctree(bool val);
    int GetNumberOfAsteroidsDrawn() const;
    virtual void Draw(float timeDelta);
    virtual void Initialize();
    virtual void LoadContent();
    virtual void Update(float timeDelta);
private:
    bool enableOctree;
    int numberOfAsteroidsDrawn;
    Octree<vector<Asteroid*>*>* octree;
    void InitializeOctree(Octree<vector<Asteroid*>*>* octree);
    void Insert(Octree<vector<Asteroid*>*>* octree, Asteroid* asteroid, Vector4 position);
};

#endif